<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no" />
    <title>兆千图</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <style>
        .fx-view-header {
            margin-bottom: 0px !important;
            border-bottom: 1px solid #E8E8E8;
            background: #F46CEF;
        }
    </style>
</head>

<body>
<div id="view">
    <header class="aui-bar aui-bar-nav fx-view-header " id="fx-header">
        <a class="aui-pull-left aui-btn" tapmode onclick="closeBack();">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">{{_i18n('app下载')}}</div>
    </header>
</div>
</body>
<script src="../script/jquery.js"></script>
<script src="../script/api.js"></script>
<script src="../script/ffkj.js"></script>
<script src="../script/vue.js"></script>
<script>
    var view = new Vue({
        el: '#view',
        data: {
            ios: 1, // 1上架 0非上架
        }
    })
    apiready = function () {
        api.addEventListener({
            name: 'keyback'
        }, function () {
            closeBack();
        })
        _openMiddleFrame();
    }

    function _openMiddleFrame() {
        // 解析属性	消除点击300S 延时问题 tapmode
        api.parseTapmode();
        var headerh;
        var footerh;
        var header = $api.byId('fx-header');
        $api.fixStatusBar(header);
        var headerPos = $api.offset(header);
        headerh = headerPos.h
        var body_h = api.winHeight;
        var browser = api.require('webBrowser');
        browser.openView({
            url: api.pageParam['url'],
            rect: {
                x: 0,
                y: headerh,
                w: 'auto',
                h: body_h - headerh
            }
        }, function (ret, err) {});
    }

    // 返回
    function closeBack() {
        var browser = api.require('webBrowser');
        browser.historyBack(
            function (ret, err) {
                console.log(JSON.stringify(ret))
                console.log(JSON.stringify(err))
                if (!ret.status) {
                    if (api.pageParam['must'] == 1) {
                        api.closeWidget({
                            silent: true
                        });
                    } else {
                        api.closeWin();
                    }
                }
            }
        );
    }
</script>

</html>